<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>WinGetActiveStats</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>WinGetActiveStats</h1>

<p>Combines the functions of <a href="WinGetActiveTitle.htm">WinGetActiveTitle</a> and <a href="WinGetPos.htm">WinGetPos</a> into one command.</p>

<pre class="Syntax">WinGetActiveStats, Title, Width, Height, X, Y</pre>
<h3>Parameters</h3>
<dl>

  <dt>Title</dt>
  <dd><p>The name of the variable in which to store the title of the active window.</p></dd>

  <dt>Width/Height</dt>
  <dd><p>The names of the variables in which to store the width and height of the active window.</p></dd>

  <dt>X, Y</dt>
  <dd><p>The names of the variables in which to store the X and Y coordinates of the active window's upper left corner.</p></dd>

</dl>

<h3>Remarks</h3>
<p>If no matching window is found, the output variables will be made blank.</p>
<p>This command is equivalent to the following sequence:</p>
<pre><a href="WinGetTitle.htm">WinGetTitle</a>, Title, A
<a href="WinGetPos.htm">WinGetPos</a>, X, Y, Width, Height, A</pre>
<p>If the active window is a hidden window and <a href="DetectHiddenWindows.htm">DetectHiddenWindows</a> is off (the default), all commands except <a href="WinShow.htm">WinShow</a> will fail to &quot;see&quot; it. If there is no active window for this reason or any other, this command will set all of its output variables to be blank.</p>
<h3>Related</h3>
<p><a href="WinGetPos.htm">WinGetPos</a>, <a href="WinGetActiveTitle.htm">WinGetActiveTitle</a>, <a href="WinGetTitle.htm">WinGetTitle</a>, <a href="WinGetClass.htm">WinGetClass</a>, <a href="WinGetText.htm">WinGetText</a>, <a href="ControlGetText.htm">ControlGetText</a></p>
<h3>Example</h3>
<pre class="NoIndent">WinGetActiveStats, Title, Width, Height, X, Y
MsgBox, The active window &quot;%Title%&quot; is %Width% wide`, %Height% tall`, and positioned at %X%`,%Y%.</pre>

</body>
</html>
